
<div class="checkbox" style="margin-left: 20px;float: left;margin-right: 10px">
    <label>
        <input type="checkbox" name="check_time" id="check" value="1" onchange="time()"> 时间范围
    </label>
</div>
<div style="padding-top: 6px;">
    <select name="category" class="st" style="height: 30px;margin-right: -3px;">
        @foreach($field as $k =>  $f)
            <option value="{{ $k }}">{{ $f }}</option>
        @endforeach
    </select>
    <input type="text" name="create_time" id="date_range" value="" class="h st" style="display: none" disabled>
    <input type="text" name="keyword" placeholder="关键词" class="st" style="height: 30px;margin-right: -5px">
    <button type="submit" class="st" style="height: 30px;margin-right: -2px"><i class="fa fa-search"></i></button>
</div>
{{--</form>--}}
<script>
    function time() {
        if($("#check").is(':checked') === true) {
            $('#date_range').removeAttr("style");
            $('#date_range').attr("disabled",false);
        }
        else {
            $('#date_range').attr("style",'display:none');
            $('#date_range').attr("disabled",true);
        }
    }
</script>